package com.zs.backend.common.enumeration;

import java.util.Objects;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 订单记录类型（1：订单打款审核2：打款申请记录3：回款记录）
 */
@Getter
@AllArgsConstructor
public enum OrderLogType {

    ORDER_PAY(1, "订单打款审核"),
    PAY_APPLY(2, "订单打款申请"),
    PAY_BACK(3, "订单回款");

    private Integer code;
    private String desc;

    public static OrderLogType valueOf(Integer value) {
        for (OrderLogType orderLogType : values()) {
            if (Objects.equals(orderLogType.code, value)) {
                return orderLogType;
            }
        }
        return null;
    }


}
